/*
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.awt.event.ActionEvent;
import javax.faces.application.FacesMessage;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;
import org.primefaces.context.RequestContext;
import util.MyUtil;

/**
 *
 * @author ebeltran
 */
@Named(value="cambioClaveBean")
@RequestScoped
public class cambioClaveBean {

    /**
     * Creates a new instance of cambioClaveBean
     */
    public cambioClaveBean() {
    }
    
    private String password1;  
    private String password2;  
  
    public String getPassword1() {  
        return password1;  
    }  
  
    public void setPassword1(String password1) {  
        this.password1 = password1;  
    }  
  
    public String getPassword2() {  
        return password2;  
    }  
  
    public void setPassword2(String password2) {  
        this.password2 = password2;  
    }  
    
    public void cambioClave(ActionEvent actionEvent) throws Exception {
        RequestContext sesion = RequestContext.getCurrentInstance();
        RequestContext.setCurrentInstance(sesion);
//        Object aplOperador = null;
//        aplOperador = contex.getAttributes().put(aplOperador, aplOperador);
        String usuario = sesion.toString().concat("usuario");
//        FacesMessage msg = null;
//        boolean loggedIn;
//        aplOperador.
        
//        msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Bienvenido",
//                     this.aplOperador.getNombres() + " " + this.aplOperador.getApellidos());
//            ruta = MyUtil.baselogin() + "pages/inicio.xhtml";
//            
//            
//        FacesContext.getCurrentInstance().addMessage(null, msg);
    }
}
